-- GENERATED SPELL FOR [Warsong Raider] --


function spell0_31435(pUnit, Event) --@Demoralizing Shout,Self--
pUnit:FullCastSpellOnTarget(13730,pUnit)
pUnit:RegisterEvent('Sorts_31435', 30309, 1)
end

function spell1_31435(pUnit, Event) --@Heroic Strike,n/a--
pUnit:FullCastSpellOnTarget(25710,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31435', 564, 1)
end

function spell2_31435(pUnit, Event) --@Intercept,n/a--
pUnit:FullCastSpellOnTarget(27577,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31435', 651, 1)
end

function Sorts_31435(pUnit, Event)
local choix_sorts_31435 = math.random(0, 2)
if choix_sorts_31435 == 0 then
pUnit:RegisterEvent('spell0_31435', 1, 1)
end
if choix_sorts_31435 == 1 then
pUnit:RegisterEvent('spell1_31435', 1, 1)
end
if choix_sorts_31435 == 2 then
pUnit:RegisterEvent('spell2_31435', 1, 1)
end
end

function mob31435_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31435', math.random(1500, 3000), 1)
end

function mob31435_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31435_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31435_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31435, 1, 'mob31435_Action')
RegisterUnitEvent(31435, 2, 'mob31435_Leave')
RegisterUnitEvent(31435, 3, 'mob31435_Kill')
RegisterUnitEvent(31435, 4, 'mob31435_Die')
